<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="">
	
	<title> Stragos - Karaoke - RestoBar </title> 

	<script src="js/jquery-1.10.2.js"></script>
	<script src="js/jquery-ui-1.10.3.js"></script>
  <script src="js/bootstrap.js"></script>
		
    <!-- Le styles -->
   <link href="css/bootstrap.css" rel="stylesheet">    
   <link href="css/bootstrap-responsive.css" rel="stylesheet">
	 <link href="css/bootswatch.css" rel="stylesheet">
   <link href="css/jquery-ui-1.10.3.css" rel="stylesheet">
	
    <!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
    <!--[if lt IE 9]>
      <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->
    
  </head>

  <body class="preview">

  <%@include file="cab_usuario.jsp"%>
   <div class="container">
 
      <!-- Main hero unit for a primary marketing message or call to action -->
      <div class="hero-unit">
      
      

<p><strong>Mantenimiento de Locales &gt; Buscar</strong></p>

<form class="form-search" id="form1" name="form1" method="post" action="LocalBuscarServlet">
  <p>Buscar: 
    <label>
    <input type="text" name="nombre" id="nombre" />
    </label>
    <label>
    <input type="submit" class="btn-success" name="button" id="button" value="Buscar" />
    </label>
  </p>
  <p>
    <label>
      <input type="button" class="btn btn-primary btn-large" name="button2" id="button2" value="Nuevo" onclick="window.location='localNuevo.jsp' "  />
    </label>
  </p>
</form>
<table width="650" height="65" border="1" cellpadding="0" cellspacing="0" class="table-hover">
  <tr>
    <th width="49" scope="col">Nro.</th>
    <th width="192" scope="col">Nombre</th>
    <th width="107" scope="col">Direccion</th>
    <th width="107" scope="col">Telefono</th>    
    <th width="192" scope="col">Acciones</th>
  </tr>

<%@page import="java.util.*, Stragos.modelo.Local" %>
<%
Collection<Local> arreglo = (ArrayList<Local>)request.getAttribute("locales");
if(arreglo != null) { 
int i = 1;
for(Local x : arreglo) {
%>  
  <tr>
    <td><%=i++ %></td>
    <td><% out.print(x.getNombre()); %></td>
    <td><% out.print(x.getDireccion()); %></td>
    <td><% out.print(x.getTelefono()); %></td>
    <td><a href="<%=request.getContextPath() %>/LocalEditarServlet?id=<%=x.getId() %>">Editar</a> - <a href="<%=request.getContextPath()%>
/LocalEliminarServlet?id=<%=x.getId()%>" onclick="return confirm('¿Está seguro que desea eliminar');">Eliminar</a></td>
  </tr>
<% }  
  } %>
  
</table>
      

      
      </div>

         <hr>
     <footer>
        <p> Copyright � 2013 :: Stragos - Todos los derechos reservados ::</p>
      </footer>
      
      
      </div> <!-- /container -->

  </body>
</html>
